home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1994 October / Macformat17.cdr / Shareware City / Developers / MacAppMods1.0d3 / Read Me First next >
Text File  |  1994-06-25  |  11KB  |  162 lines

  1. CodeWarrior DR3 and MacApp 3.1 final “Care Package” 1.0d3
  2. Using CodeWarrior to build MacApp 3.1 final
  3. 1.0d3    6/25/94    changes for this version are marked with @@@
  4.                 fixed bad cut and paste typo in MODs (marked with @@@)
  5.                 noted that later versions than 6-13-94 fixed the bug mentioned in MacAppHeaders.h
  6.                 moved the wantDebugging to MacAppHeaders.h where it is handier
  7.                 changed  #ifdef __MWERKS__ to  #if __MWERKS__  && qDebug for the AppleEvent hack 
  8.  
  9. 1.0d2    6/24/94    changes for this version are marked with •••
  10.                 added prebuilt projects for MacApp libraries and DemoDialogs with all settings
  11.                     (projects are for DR3 compiler)
  12.                 added Runtime.o.lib (the same as on DR3 but added for completeness)
  13.                 added qPerform define (can't use it with CW though) in MacAppHeaders.cp
  14.                 added MacAppHeaders.h to show how to add your own compile time flags
  15.                 additional mods to force drawing of the Debug menu, fix PascalString.h to be
  16.                     more ARM compliant, and fix a bug in UMenuMgr.cp with System 7.5
  17.                 changed Full Macsbug names to None (for smaller app size)
  18.  
  19. 1.0d1    6/12/94    first version
  20.  
  21. Enclosures:
  22. DemoDialogs68K.π.SEG, MODs, NubDispatchGlue.o.lib, Unmangle.o.lib, MacAppHeaders.cp, UMemory.cp, 
  23. UMemory.h and DisAsmLookup.h
  24. •••MacAppHeaders.h, and projects for PPC and 68K builds
  25.  
  26. Both CodeWarrior and MacApp 3.1 were going Golden Master about the same time.  Consequently the 
  27. various Release Notes on the two products aren’t quite up-to-date.  This document will attempt 
  28. to do three things:
  29. 1.  Give you a step by step procedure to set up MacApp 3.1 and CW.
  30. 2.  Show how to use MABuildRSRC with ToolServer or MPW. (Still Not Done.)
  31. 3.  Show you some changes you can make to your MacApp Libraries to give you more functionality.
  32.  
  33. 1.  The step by step instructions…
  34. 68K  (For a debug version see item 3 below.)
  35. These are the instructions for a nodebug version of MacApp 3.1 final.  Take the folder 
  36. CodeWarrior Tools ƒ:MacApp 3.1 Projects:MacApp Headers ƒ and put that folder inside the 
  37. Metrowerks C/C++ ƒ.  Go back to CodeWarrior Tools ƒ:MacApp 3.1 Projects:68K:DemoDialogs68K: 
  38. and open DemoDialogs68K.π.  When you open the project, it will tell you that it can’t find an 
  39. access path.  Click on Preferences and move to the Access Paths icon.  Select the path and 
  40. click Change.  Move to your MacApp folder and select it.  Remove the ANSI (2i) C.68K.Lib 
  41. library and replace it with the ANSI (4i) C.68K.Lib that you downloaded from our ftp site.  
  42. (The ANSI (4i) C.68K.Lib on the CD is broken.)  Open the file MacAppHeaders.cp (found in the 
  43. MacApp Headers ƒ) and precompile naming it MacAppHeaders68K++.  Be sure to check the 
  44. isHighLevelEventAware and LocalAndRemoteHLEvents flags in the SIZE pop-up menu (in the 
  45. project pane).  Put the file DemoDialogs68K.π.SEG in the project folder.  (This file was 
  46. originally created for MacApp 3.1ß1.  It maps segment names and instructs the compiler to 
  47. combine various segments together.  Using this file will greatly reduce the number of segments 
  48. in your app.  The compiler searches for a file with the project name plus .SEG so feel free to 
  49. rename it for your projects.  Be aware that it was written for an earlier version of MacApp and 
  50. it might not work as well if different segments are renamed.)  Build DemoDialogs68K.  I have 
  51. noticed that the preferences occasionally don’t seem to “stick”.  If they migrate to the factory 
  52. settings select the following:
  53. Language: Activate C++ Compiler and use MacAppHeaders68K++ for the prefix file
  54. Warnings: none
  55. Processor: Large code model, 68K struct alignment, 68020, 4 byte ints,  Peephole Optimizer, CSE 
  56. Optimizer, Optimize For Size, Far Virtual Function Tables, and Far String Constants
  57. Linker: •••"None" Macsbug Names, Generate SYM File, Full Path in Sym Files, Generate Link Map, 
  58. Generate A6 Stack Frames, The Debugger™ Aware, and Fast Link
  59. Project: DemoDialogs68K, SS11 (for creator), minimum 1500, prefered 1500, 
  60. acceptSuspendResumeEvents, canBackground, doesActivateOnFGSwitch, is32BitCompatible, 
  61. isHighLevelEventAware and LocalAndRemoteHLEvents SIZE flags
  62. Access Paths:  The MacApp folder
  63.  
  64.  
  65. •••PPC        (For a debug version see item 3 below.)
  66. These are the instructions for a nodebug version of MacApp 3.1 final.  Take the folder 
  67. CodeWarrior Tools ƒ:MacApp 3.1 Projects:MacApp Headers ƒ and put that folder inside the 
  68. Metrowerks C/C++ ƒ.  Go back to CodeWarrior Tools ƒ:MacApp 3.1 Projects:PPC:DemoDialogsPPC: 
  69. and open DemoDialogsPPC.π.  When you open the project, it will tell you that it can’t find an 
  70. access path.  Click on Preferences and move to the Access Paths icon.  Select the path and 
  71. click Change.  Move to your MacApp folder and select it.  Open the file MacAppHeaders.cp 
  72. (found in the MacApp Headers ƒ) and precompile naming it MacAppHeadersPPC++.  Be sure to check 
  73. the isHighLevelEventAware and LocalAndRemoteHLEvents flags in the SIZE pop-up menu (in the 
  74. project pane).  Build DemoDialogsPPC.  I have noticed that the preferences occasionally 
  75. don’t seem to “stick”.  If they migrate to the factory settings select the following:
  76. Language: Activate C++ Compiler and use MacAppHeadersPPC++ for the prefix file
  77. Warnings: none
  78. Processor: 68K struct alignment, Optimize for Speed and select all 3 boxes
  79. Linker: Generate SYM File, Full Path in Sym Files, Generate Link Map, Faster Linking, and
  80.     the default Entry Points of __initialize, __start, and __terminate.
  81. PEF:  "None" Export Symbols and everything else either 0 or unchecked
  82. Project: DemoDialogsPPC, SS11 (for creator), minimum 1536, prefered 1536, stack 128
  83. acceptSuspendResumeEvents, canBackground, doesActivateOnFGSwitch, is32BitCompatible, 
  84. isHighLevelEventAware and LocalAndRemoteHLEvents SIZE flags
  85. Access Paths:  The MacApp folder
  86.  
  87. 2.  How to use MABuildRSRC…
  88. Not completed yet.  The resource files supplied with DR3 can be used with debug and nodebug 
  89. versions (or at least I do).  Another alternative is to simply use the resource fork of an 
  90. MPW MacApp build of your app (without theCODE resources, of course).  I will prepare  a FAQ 
  91. about using MABuildRSRC with ToolServer ASAP.
  92.  
  93. 3.  Debug versions of MacApp…
  94. I am able to to build MacApp 3.1 final with DR3 with the following flags:  qDebug, qDebugMsg, 
  95. qInspector, qTheDebugger and of course qSyms and qNames.  The changes here (except for my 
  96. changes to UFailure.cp) have been suggested by others, notably Cory Kempf, Jeroen Schalk and 
  97. Frederick Sigal although none of them in any way endorse my combination of mods.  I hope that 
  98. if anyone sees a better way to do this, they will contact me so I can update this document.
  99.  
  100. 68K:
  101. •••Projects are included for building DemoDialogs68K, a MacApp library, and a DemoDialogs68K 
  102. version that uses the MacApp library
  103. •••Use the .rsrc files (changing the name if you are using the library including version) from 
  104. the CodeWarrior Tools ƒ:MacApp 3.1 Projects:68K:DemoDialogs68K: folder.
  105.  
  106. •••Replace the MacApp Headers ƒ you put in the compiler folder with the same named folder found
  107. in the folder you got this doc.  Open the DemoDialogs68K.π and changed the access path to 
  108. point to your MacApp folder.
  109. From the MODs file:
  110. •••Two changes must be made to UMenuMgr.cp.
  111. •••One change must be made to PascalString.h to make the code more ARM compliant (changing the 
  112. friend Boolean operators to a friend inline Boolean operator; be careful that you only change
  113. the ones I've included.)  Two other changes are necessary if you are using the 6-13-94 MPTP
  114. version (only distributed to our beta sites); 
  115. @@@later versions of the compiler have fixed the bug.  
  116. You use the MacAppHeaders.h file to switch changes on or off.
  117. @@@You can also use MacAppHeaders.h to set wantDebugging so that qDebug, qDebugMsg, qTheDebugger,
  118. etc. can be set with one switch.
  119. Change UObject.h to the new version.  (The change only affects the declaration of TObject and 
  120. allows Jasik’s debugger to display the class tree.)
  121. Replace UMemory.h and UMemory.cp entirely.  (This is supposed to be a better method of memory 
  122. management which doesn’t conflict with CW’s segment loading.  I haven’t tested to see if that 
  123. is true, but it was recommended to me and I don’t have problems with it.)
  124. Make the 4 changes to UDebug.cp and the 1 change to UDebug.h.  You’ll also need to add 
  125. NubDispatchGlue.o.lib, Unmangle.o.lib and put DisAsmLookup.h in the MacApp directory.
  126. Add the last bit of code above the function Assertion().  With qDebug set, MacApp calls 
  127. fprintfs to output to your debugger.  Unfortunately this is done with _addDevHandler which 
  128. CW doesn’t support.  Instead the fprintfs get sent to CW’s SIOUX window which unfortunately 
  129. wants to put up it’s own menus.  I’ve written a hack which sends the output to the Scriptable 
  130. Text Editor via AppleEvents.  Add AEObjectSupportLib.o.lib to your project.  IMPORTANT  You 
  131. must have a Scriptable Text Editor window open.  So far I haven’t written the code to bring up 
  132. a window if it doesn’t already exist.  Other limitations: If you select the 
  133. data in the Scriptable Text Editor window and delete it while DemoDialogs is running, you don’t 
  134. get additional messages.  
  135. I consider the AppleEvent hack a temporary mod until CW supports a menu-less SIOUX window (we 
  136. are working on it as I write this) and/or support _addDevHandler.
  137. @@@Re-precompile MacAppHeader.cp and call it whatever you want to put in the include statement,
  138.  e.g. MacAppHeaders68K_DR3; remove all binaries and re-build.
  139.  
  140. PPC:
  141. •••Projects are included for building DemoDialogsPPC, a MacApp library, and DemoDialogsPPC
  142. version that uses the MacApp library
  143. •••Use the .rsrc files (changing the name if you are using the library including version) from 
  144. the CodeWarrior Tools ƒ:MacApp 3.1 Projects:PPC:DemoDialogsPPC: folder.
  145.  
  146. Do all of the above 68K stuff, except don’t add any of the libraries.  Instead only add 
  147. ObjectSupport.lib. Use PPC in project names instead of 68K.  The ANSI library on the CD is OK.
  148.  
  149. If you discover other bugs or have other suggestions, I will try to keep this “Care Package” 
  150. up-to-date at the usual internet sites: AOL, AppleLink:CodeWarrior Discussion and our ftp site 
  151. at acura.gslis.utexas.edu.  Please send comments to AL: MARKANDERSON or (preferably) 
  152. marka4@metrowerks.ca.  My goal is to provide the necessary mods so that CW builds of MacApp 
  153. suffer little or no loss of the functionality that users have grown to expect with MPW builds.  
  154.  
  155. Future plans:  Give instructions for MABuildRSRC, look into segment loading and 
  156. write a CW version of _addDevHandler.
  157.  
  158. Thank you, 
  159.  
  160. Mark Anderson
  161. metrowerks
  162.